import { defineStore } from 'pinia'
export const useSystemStore = defineStore('system', {
  state: () => ({// // 定义存储状态
    state: {
      version: 0,
      lastUpdate: null as Date | null
    }
  }),
  actions: {
    async refresh() {
      this.state = {
        version: this.state.version >= Number.MAX_SAFE_INTEGER - 1 ? 0 : this.state.version + 1,
        lastUpdate: new Date()
      }
    }
  }
})